Skip to content

[Test build] Satellites and moving target follow with INDI mount control - #699

Closed
mrosseel wants to merge 676 commits into
brickbots:mainfrom
mrosseel:feature/satellites-indi
Closed

mrosseel wants to merge 676 commits into
brickbots:mainfrom
mrosseel:feature/satellites-indi

Conversation

@mrosseel

Copy link
Copy Markdown
Collaborator

Test build, not for merge

This draft PR exists so that a PiFinder can install a build of mrosseel:feature/satellites-indi from the unstable channel. The review of the work happens in four PRs on mrosseel/PiFinder, in this merge order:

  1. [1/4] feat: INDI mount control over USB and WiFi (simplified #367 design) mrosseel/PiFinder#125 INDI mount control
  2. [2/4] feat(satellites): satellite catalog, selectable groups, pass prediction and web TLE entry mrosseel/PiFinder#127 Satellite catalog
  3. [3/4] feat(mount): polar alignment with the mount turning the RA axis mrosseel/PiFinder#128 Polar alignment with the mount
  4. [4/4] feat(mount): follow moving targets with user correction, lunar and solar rates mrosseel/PiFinder#129 Follow of moving targets (this branch)

The branch holds #125, #127 and #129. It is based on the asteroids branch (#534), so the diff against main also holds the asteroid, Gaia chart and NixOS work.

What to test on a device

  • Objects > By Catalog > Satellites... > Sat groups: select CelesTrak groups. A group without a file downloads at once.
  • The Satellites list: the PASS sort lists the satellites above the horizon first.
  • The /satellites web page: groups, custom element sets, the "In the sky now" table, the pass table.
  • With an INDI mount: key 5 on a satellite follows it. The arrow keys correct the path. A corrected element set is stored when the follow ends.

Not tested on a real mount yet.

🤖 Generated with Claude Code

mrosseel and others added 30 commits July 17, 2026 15:02
BlackLevelTracker fits the sky-vs-exposure intercept from naturally varying
exposures to recover the wandering sensor pedestal, gated on transmission-
stable frames, feeding pedestal_override. CloudEstimator gains the sky-excess
guard: cloud (dims stars AND brightens sky) is distinguished from dew/optics
(dims stars, sky follows) so only genuine cloud is flagged and corrected;
baselines become asymmetric medians of clear-flagged frames, factory-seeded.
- Boot: process both the Pi 4B and CM4 DTBs with the PiFinder overlays
  and drop the forced 4B FDT in favour of extlinux FDTDIR + u-boot's
  board-detected ${fdtfile} (64-bit u-boot prefixes it with broadcom/),
  so one image boots the matching DTB on both boards. Verified with
  fdtoverlay: all overlays (spi0, uart3, i2c-gpio, pwm, gpio-poweroff,
  imx290 + xclk) apply cleanly to bcm2711-rpi-cm4.dtb.
- Boot splash: SSD1333 176x176 mode (init per ssd1333_device.py, welcome
  image centered, flush rotated 270 deg to match the app's luma rotate=3)
  selected at runtime from the device-tree model string (CM4 = v4), which
  is available in early boot unlike the charger probe.
- gpsd: new pifinder.gpsBaud option (-s <baud>); default stays autobaud,
  which serves both the rev-3 GPS and the v4 u-blox Gen10 at 115200.
- hardware_detect: document that the BQ25895 ACK is a valid rev-4 marker
  because a battery is mandatory on v4.

Needs on-device validation: CM4 DTB selection at boot, SSD1333 splash
orientation, and 4B regression (FDT -> FDTDIR switch).
…tion

Publish SQM as a fixed-calibration radiometer (factory zero point x measured
sky flux) at 1 Hz from every camera frame, no plate solve required. Stellar
photometry becomes a 10-second transmission diagnostic that establishes,
maintains and audits the calibration:

- sqm/radiometer.py: camera-side sparse-central-median sample; 12-sample/15 s
  accumulator; factory radiometric zero point + FOV per sensor profile.
- sqm/clouds.py: cloud/dew discrimination. Cloud dims stars AND brightens a
  light-polluted sky (radiometer immune, no correction); dew/optics dim stars
  and sky together (stellar deficit compensates the radiometer once a clear
  session baseline exists). Asymmetric median baselines, factory-seeded.
- sqm/black_level.py: sensor pedestal tracked from the sky-vs-exposure
  intercept of ordinary frames (the true black level wanders +/-2 ADU night
  to night); fed at 1 Hz, gated on transmission stability, zero-touch only.
- sqm/gaia_ref.py + astro_data/hip_gaia_g.npz: Gaia G reference band with
  BP-RP trim for bare sensors (24-29% less star scatter than Hipparcos V).
- Robust stellar zero point: fixed catalog-magnitude band + 3-MAD rejection;
  centroid-excluded background annuli; growth-curve aperture correction.
- Calibration wizard rework: temporal read noise, multi-exposure dark fit,
  exact frame/solve pairing, typed reload command, transient exposures.

Archive replay (16 sweeps, 800 frames): imx462 MAE 0.05 mag over six
SQM-L-referenced clear nights; bright-cloud errors 0.35-0.84 collapse to
under 0.10 with zero corrections on clear skies; 800/800 frames published
including 318 without usable stars.
Each sweep image pair now gets img_NNN_XXms_metadata.json carrying the
driver-applied exposure/gain, sensor die temperature, sensor black levels,
Lux, colour gains, and raw-frame ADU statistics (mean/median/std/percentiles,
saturated fraction). frame_metadata.json aggregates the same records.

Also gate the sweep UI COMPLETE transition on sweep_metadata.json existing:
the camera process writes it a few seconds after the last image, and
enriching before that silently skipped the SQM/solve/noise-floor details
on every sweep.
Each tracker (BlackLevelTracker, CloudEstimator, WingEstimator,
RadiometerAccumulator) gains dump(): config, derived stats, and the full
window sample contents. The solver publishes these into sqm_details as
window_black_level / window_clouds / window_wings / window_radiometer on
every update, and each sweep image JSON snapshots the whole sqm_details,
so a sweep records the pipeline state frame by frame.
…ot the old base

activate_system compared the persisted camera-type against --default-camera,
i.e. the RUNNING generation base camera. On a device whose build had that
camera as its base (mr: imx477-base build), upgrading onto an imx462-base
build concluded camera is the base, nothing to do and rebooted into the
wrong DTB, killing the camera. Ask the new store path for a matching
specialisation instead, and run the NEW build set-extlinux-default so the
camera-to-entry mapping matches the entries just written.
…erization

Plan B for the stuck-pedestal incident (2026-07-17):
- BlackLevelTracker: an accepted pedestal is now a lease (max_age_seconds,
  default 900 s) instead of a latch — without a fresh accepting refit it
  expires and callers fall back to the profile constant, the same state
  every session boots in. Regression test replays the incident.
- max_intercept_stderr tightened 1.0 -> 0.6 ADU: honest ramp fits on the
  27-sweep archive run 0.10-0.69; the cloud-poisoned fit passed at 0.97.

Calibration wizard (dark-frame path the imx296 tester will run):
- persists a per-frame report JSON (median/MAD/percentiles, requested AND
  driver-reported exposure, sensor temp) beside the fitted scalars — the
  ramp shape is where short-exposure pedestal elevation shows, and three
  fitted numbers cannot preserve it
- dark-current fit uses driver-reported exposures (the imx477 delivers
  intermittent half-exposure frames; a requested-exposure fit is silently
  corrupted)
- dark ladder extended from one decade to near sensor minimum, covering
  the elevation zone (imx462: +2.9 ADU at 25 ms, 0 at ~300 ms)

Sweep instrumentation:
- per-image records now carry the full driver metadata dict (new sensors
  report different keys) and the live camera-side radiometer sample
  (the sqm_details snapshot freezes while the solver starves mid-sweep)
- camera_pi keeps last_frame_metadata; both image_metadata sites publish
  actual_exposure_us
…mat stragglers

mypy: the B-V cache globals are Optional, so assignments cannot narrow
them across statements; parse into locals and use those for savez/len.
format: 4 files the CI format session was silently reformatting on every
run (timeentry, three tests).
Telemetry captured only IMU and solve streams — blind to the radiometric
side. A third event type records the camera-side radiometer sample at
~1 Hz: t (capture epoch, s), exp (driver-reported exposure, s), bg
(background median, ADU), mad (median absolute deviation, ADU), grad
(quadrant gradient, ADU), seq (frame sequence). Dedupes on sequence;
replay players skip unknown event types, so old builds read new files.

A full-night radio stream answers what sweep snapshots cannot: how
auto-exposure actually behaves over a session (lever-arm availability
for the black-level fit), a continuous sky-steadiness timeline, and
real-night input for replaying pedestal estimators.
The marking menu down slot is the one readable at the eyepiece without
moving your head — it goes to SWEEP, the everyday reference-meter action.

SQM Correct is deleted rather than kept: a magnitude-additive session
knob silently absorbs ADU-space, brightness-dependent errors (tonight:
a stuck pedestal), masking exactly the fault class it appears to fix,
and staling whenever the layers beneath it change. Its legitimate
output — the unit-vs-reference-meter difference — is already recorded
as evidence by every sweep run with a reference reading. The feature
never shipped upstream (fork-only), so now is the cheapest moment to
remove it.

Removed: UISQMCorrect screen, menu entry and corrected indicator,
_apply_sqm_correct and both solver call sites, the sqm_correct_delta
shared state, and all test references. CONTEXT.md records the decision.
python/result and python/result-lib are nix build output symlinks that were
committed before .gitignore's result/result-* rule existed, so they stayed
tracked and kept getting re-snapshotted into unrelated commits. Untrack them;
the existing ignore rule keeps them out from now on.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXDxJkU5CzAegv3FcMEwEq
The NixOS migration UI flow (UIMigrationConfirm/UIMigrationProgress) was removed
from ui/software.py in 'refactor(software): delete the NixOS migration UI flow',
but a later sqm-fix merge reintroduced the test's import and spec builders for
those deleted classes, breaking test collection. Drop the stale references.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXDxJkU5CzAegv3FcMEwEq
Syncs nixos (result-symlink untrack, test_ui_modules migration-ref fix,
radiometer/black-level/telemetry). Adopts nixos's solver.py wholesale: restores
the PR#24 cedar shmem reopen handshake + tetra3 load-by-name, and drops SQM
Correct (removed on nixos in feat(sqm)!). Conflicts in main.py /
camera_interface.py / update_manifest.py resolved to the shared-state form both
sides had converged on; uv.lock regenerated from the merged pyproject.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXDxJkU5CzAegv3FcMEwEq
test_radec_entry exercised an older dependency-injection API (BlinkingCursor
time_provider; CoordinateConverter/CoordinateEntryLogic calc_utils_provider;
LayoutConfig no-arg) that radec_entry dropped for module-level calc_utils/time.
Patch calc_utils/time at the module level and pass a display stub to
LayoutConfig so the suite matches the implementation. 6 stale tests were failing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXDxJkU5CzAegv3FcMEwEq
test_radec_entry exercised an older dependency-injection API (BlinkingCursor
time_provider; CoordinateConverter/CoordinateEntryLogic calc_utils_provider;
LayoutConfig no-arg) that radec_entry dropped for module-level calc_utils/time.
Patch calc_utils/time at the module level and pass a display stub to
LayoutConfig so the suite matches the implementation. 6 stale tests were failing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXDxJkU5CzAegv3FcMEwEq
test_radec_entry exercised an older dependency-injection API (BlinkingCursor
time_provider; CoordinateConverter/CoordinateEntryLogic calc_utils_provider;
LayoutConfig no-arg) that radec_entry dropped for module-level calc_utils/time.
Patch calc_utils/time at the module level and pass a display stub to
LayoutConfig so the suite matches the implementation. 6 stale tests were failing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXDxJkU5CzAegv3FcMEwEq
Surface the ten shielded optical-black rows the IMX290/462 sensor already
transmits and use their trimmed mean as the complete per-frame pedestal for
radiometric SQM. This makes IMX462 SQM zero-touch: no lens cap, dark frames,
or calibration wizard from the user.

Kernel: a second sensor source pad (MEDIA_BUS_FMT_SENSOR_DATA) routes the OB
rows to the receiver as a separate metadata stream without altering the
1920x1080 image matrix.

libcamera: the imx290 cam-helper unpacks the shielded pixels, trims the outer
5% each side and averages the central 90% (preserving sub-ADU resolution on
the 16-bit SensorBlackLevels scale), publishing {l,l,l,l+1}. The +1 marker
lets Python tell a measured value from a static tuning tuple.

Python: camera_pi reads SensorBlackLevels for imx290/imx462 and passes the
native-ADU value as the radiometer sample's optical_black_pedestal. A valid OB
value is the complete pedestal; calibrated then profile pedestals remain the
fallback when OB is missing or unmarked.

Validated on mr2 (IMX462, gain 30) by a same-frame cupboard test: active-green
vs OB dark-accumulation slopes agree to well under 1 ADU/s, so OB is a valid
complete pedestal. Kernel is built via nixos-hardware; pifinder-fast/
pifinder-kernel-cross give a fast x86_64 cross build to seed the binary cache
so CI substitutes the kernel instead of compiling it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015EWb2JET2JE1t4ya3HZPNL
mrosseel and others added 27 commits November 12, 2026 09:41
Conflict fixes between the asteroid branch and the INDI branch:

- The object screen has one marking menu property. It gives the
  mount menu on the mount page, the chart menu on a Gaia chart and
  the default menu elsewhere.
- The number keys enter an eyepiece focal length on the image page,
  and they are mount keys on the other pages.
- cardinal_vectors moved from cat_images to object_images.image_utils.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Key 5 on a satellite sends a follow_satellite command with the TLE.
The mount process computes the satellite position of date itself,
ten times a second, in the new phase MOUNT_SATELLITE_FOLLOW:

1. Aim: goto the position of the satellite after the expected slew
   time. Each slew measures its time for the next lead.
2. Wait until the satellite arrives at that point.
3. Track: custom track rates equal to the satellite motion, set
   every second. At 0.5 degrees error the mount aims again.
4. Pass: a mount without custom rates holds the aim point, and aims
   again when the satellite is 1 degree past it.

The follow ends below 5 degrees altitude, and on any command that
moves or stops the mount.

MountControlIndi.set_track_rates uses TRACK_CUSTOM. In the INDI
telescope simulator both axes have the inverted sign, and INDI
refuses an RA reversal while tracking is on. The driver therefore
learns the sign of each axis from the measured motion, and it turns
tracking off and on for a reversal. Simulator tests cover both
directions and a follow from aim to track.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A goto now carries a track rate. With the new setting Mount > Track
Rate on Auto, the Moon gets the lunar rate and the other objects the
sidereal rate. Sidereal, Lunar and Solar select a fixed rate at once.
The Sun is not in the catalog, so solar tracking is a manual choice.

The INDI driver uses TRACK_LUNAR or TRACK_SOLAR when the driver has
it. Otherwise it computes the topocentric motion of the Moon or the
Sun and sets custom track rates, updated every minute. Drift
compensation adds its measured drift on top of the lunar or solar
rate. The status line shows Lunar or Solar after Tracking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drift compensation never corrected a drift. The phase drops the
solves older than the window, and then waits for solves that span
the full window. The span is therefore always shorter, and the fit
never runs. It now runs at 80 % of the window. The unit test spaced
the solves exactly 1 s apart, so one solve fell on the window edge.

The correction must move the pointing against the drift. The
directions of the INDI rate axes differ: in the telescope simulator
a TRACK_RATE_RA above sidereal decreases the RA, and a positive
TRACK_RATE_DE decreases the Dec. The driver keeps a direction per
axis. If a drift after a correction has the same direction and is
1.5 times larger, the correction went the wrong way. The axis then
turns its direction, and the next correction cancels the full drift.

A simulator test drifts the mount 10"/s in RA and 20"/s in Dec and
checks that the drift ends, also with a wrong start direction on
either axis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heck

The UI module tests replace time.sleep with a no-op for the whole
session. The comet catalog's retry thread slept with time.sleep, so
it called the mocked download in a loop without a pause. The mock
kept every call, about 830,000 a test, and the test process grew to
53 GB until the kernel stopped it. The retry now waits on a
threading.Event, as the asteroid catalog does. The UI module tests
now stay below 300 MB and take 42 s.

test_closed_loop_goto_refines_onto_the_target checked that the sky
simulator saw syncs of 1.5 degrees in total. When the mount sends the
location after the simulator listens, the reported RA moves by the
change of longitude, and the simulator counts that jump as well. The
simulator now keeps a list of the jumps, and the test checks for the
refine sync of (1.5, -0.8) degrees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The striped tables put grey text on light grey rows: every second
row could not be read. The tables now use the plain dark style of
the other pages. The standard magnitude field is wider, so its label
no longer runs over the input line.

The full nav bar needs about 1500 px. Between 993 and 1500 px its
links ran under the logo and wrapped over the page title, and the
Satellites link made that worse. Below 1500 px the page now shows
the menu button and the side menu, with the logo in the centre, as
on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The follow tracked at the satellite rates only. An offset from the
first seconds stayed: in the INDI simulator the mount learns the
direction of the Dec axis after some seconds, and in that time it
drifted 0.13 degrees off. The follow then aims again only at 0.5
degrees.

The track rates now add one fifth of the offset per second, at most
0.1 degrees per second. The offset uses the satellite position at
the time of the last mount position report, so the report delay
causes no bias. The driver checks the axis directions every second
instead of every 1.5 s. In the simulator the follow is now within
0.05 degrees after 20 s.

test_object_details_mount_keys sets the track rate setting itself:
the menu sweep of other tests can change it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on, sky table

Fixes for the satellite catalog and its web pages:
- Try a failed download again after 60 s. Show the Error state when no
  element file exists.
- A pass request during a run causes one more run after it.
- The 5 s position update makes the lists build again only when the
  objects, a filter verdict, the satellites above the horizon or the pass
  data change.
- One update reads the time and the location from the shared state once.
  SGP4 runs for all satellites in one call.
- Only one download runs at a time. A forced download is refused for
  5 minutes after the last one.
- Deleting a user satellite removes its magnitude.
- The web form gives the correct message for a NORAD number that CelesTrak
  does not have, refuses nan and inf magnitudes, and limits a file to 1 MB.
- Cache the epoch of an element set. Remove code without a caller.

New:
- Check boxes on /satellites enable or disable each CelesTrak group and
  each user satellite. The choice is stored in selection.json.
- /satellites has a table of the satellites above the horizon now.
- The description of a satellite above the horizon starts with its
  altitude and azimuth. The PASS sort lists these satellites first.
- The satellite pages show a note when the time is not from the GPS.

Co-Authored-By: Claude <noreply@anthropic.com>
The follow code takes a target that gives a position and a rate for a
time. Satellites, Solar System bodies and sampled tracks (comets,
asteroids) use the same follow steps.

- target_follow.py replaces satellite_follow.py.
- The arrow keys correct a follow. The along-track part becomes a time
  offset, the cross-track part an angle. The log gets the corrected TLE
  when the follow ends.
- A plate solve during the slow part of a follow gives a pointing
  offset. The follow keeps it when the solver fails during the pass.
- The follow uses the GPS time, not the system clock.
- Key 5 follows a comet or an asteroid that moves 60 arcsec per hour
  or more. Slower objects get the usual goto.
- The lunar and solar rates use the same rate function as the follow.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
A mount follow that the user corrects with the arrow keys gives a
corrected element set. The set is stored in corrected.tle, one per NORAD
id, with the name "<name> corr <UTC date and time>".

A corrected set keeps the epoch of the set it corrects. It replaces a
set of the same epoch or older, so a newer download replaces it. The web
page lists the corrected sets in their own table, with a check box and a
delete button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A follow that the user corrects with the arrow keys stores its corrected
element set as a corrected entry of the satellite catalog. The PiFinder
shows the name of the stored set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While tracking, an INDI driver rejects a TELESCOPE_TRACK_RATE whose sign
is the opposite of the current rate. The driver logs "Cannot reverse
tracking" and sends no reply, so the drift correction was lost. The
driver also keeps the rejected value as its current rate, so the next
correction was accepted or rejected by chance. Drift compensation then
converged slowly, and the drift test failed sometimes.

An axis whose rate changes its sign now gets a zero rate first, then
the new rate. The mount loop also returns on the exit command, so a
thread that runs it ends with no unhandled SystemExit.

Co-Authored-By: Claude <noreply@anthropic.com>
The satellite page lists 26 CelesTrak groups. A check box per group
decides download, update and use. The default is visual and stations.
The selection is stored in selection.json under the key groups.

The large groups oneweb, kuiper, starlink and active are in the list.
They are marked as large and are not selected by default.

Each selected group has an Update button. The button Update selected
updates all selected groups. The 5-minute wait applies to each group.
A selected group without a file downloads at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
find_passes_many propagates the satellites in chunks on a coarse grid
of 1/20 orbit with one SatrecArray call per chunk. It interpolates
between the grid points with cubic Hermite polynomials from the SGP4
velocities, in the Earth-fixed frame (GMST 1982), and refines the
culminations by golden section search and the rises and sets by
bisection. Visibility and magnitudes are vectorized. A pass in full
daylight gets no samples.

Starlink (10,611 satellites, 24 h) takes 1.7 s instead of about 150 s
on x86. The peak extra memory is about 15 to 30 MB.

A pass in progress at the start or the end of the window now starts or
ends there. Dips below the minimum altitude of high orbits now split a
pass. A satellite that SGP4 cannot propagate gets no passes and one log
line. find_passes keeps its signature and calls the new function.

SatelliteCatalog uses find_passes_many. The 5 s position update looks
up all constellations in one call and keeps a MagnitudeObject that did
not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Objects > By Catalog > Satellites... > Sat groups selects the CelesTrak
groups. The selection is selection.json, the same file as the web page.
A large group has a "*" mark and shows a message when you select it.
A selected group without a file downloads in a background thread. The
menu shows "Downloading" and then the result.

UITextMenu gets three general hooks. A multi menu with values_callback
and toggle_callback stores its values through them. update_callback runs
on each frame.

The group list moves to PiFinder/satellite_groups.py, which imports
nothing heavy. PiFinder.satellites re-exports the names.

By Catalog order: Messier, NGC, Planets, DSO..., Stars..., Small
bodies... (Comets, Asteroids), Satellites... (Satellites, Sat groups).
The web remote tests, the demo key script and the menu map follow it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e file

The satellite catalog updates positions, predicts passes and downloads
only while satellites are in use. The object list of the catalog, the
object details screen of a satellite, active_catalog(), tracked() and
live_radec() call touch(). Ten minutes after the last use, the work stops.
The next use updates the positions at once and starts a pass run when the
passes are old. At boot, only the selected groups without a file download.

The catalog no longer writes passes.json. The web server computes the
pass table itself in a background thread, one computation at a time, and
keeps it in memory for 30 min. A change of the element files, of the
selection or a location move of more than 0.5 degrees invalidates it.
The page shows "Calculating passes" and loads again while it computes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fit of the drift window unwraps RA relative to the first solve, so a
window across RA 0 gives the true drift.

An axis is corrected when its slope is at least 4 standard errors of the
slope from the fit residuals, with at least 10 solves. This replaces the
R2 gate, which needed a drift of about 2"/s with 2" noise. A drift on the
sky below 0.05"/s gets no correction.

While no axis is significant, the window grows from
drift_compensation_window up to 60 s, then a new window starts. A new
window does not reuse the last solve of the old window.

A correction is 0.7 of the measured drift. The INDI mount turns an axis
direction only when the new and the last drift are both significant and
the growth is above their standard errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ough zero

This change also merges feat/indi-mount-control (the drift compensation
fixes) into feature/satellites-indi.

A follow without custom track rates turns the tracking off for a target
that is almost fixed in alt-az, such as a geostationary satellite. The
mount then stays on the target, and a goto is necessary only for its
small motion. The tracking turns on again when the follow ends.

The follow, lunar and solar custom rates use the rate helper of the
drift compensation. An axis whose rate changes its sign gets a zero rate
first, so the driver does not refuse a Dec reversal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sses

A satellite with one turn per sidereal day and an almost circular orbit
stays at one place in the sky. The pass prediction skips it. The device
says "Geostationary: fixed in the sky" or "never rises here", and the
web page says "Always up" with its altitude and azimuth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mrosseel mrosseel added the testable Ready for testing via PiFinder software update label Nov 14, 2026
@mrosseel

Copy link
Copy Markdown
Collaborator Author

Replaced by #700, which also holds the polar alignment (mrosseel#128).

@mrosseel mrosseel closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testable Ready for testing via PiFinder software update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant